package com.nyf.web.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

public class MyServletContextListener implements ServletContextListener{

	public void contextDestroyed(ServletContextEvent sce) {
	
		System.out.println("ServletContext destroyed >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
	}

	public void contextInitialized(ServletContextEvent sce) {
		
		ServletContext ctx = sce.getServletContext();
		
		String str = ctx.getInitParameter("myKey");
		System.out.println("ServletContext init >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> " + str);
	}

}
